from langchain_community.document_loaders import PyPDFLoader

from langchain_rag.rag.document_splitting import split_documents


def load_document(file_path):
    loader = PyPDFLoader(file_path)
    documents = loader.load()
    return documents


if __name__ == '__main__':
    documents  = load_document("平安保险用户手册.pdf")
    print( documents)
    split_docs = split_documents(documents)
    print("="*50)
    print(split_docs)
